﻿Imports System.Data.Linq
Imports System.Linq

Public Class MCustomer
    Private db As New TanNamChinhDataContext
    
 
    Public Function getTelCustomerOfFile(ByVal idCus As Integer) As String

        Dim tels As String = ""
        Try
            tels = (From b In db.tblCustomers
                     Where b.ID_Customer = idCus
                     Select b.Tel).First()
        Catch ex As Exception
            Return ""
        End Try
        Return tels
    End Function
    Public Function getCustomerNameOfFile(ByVal idCus As Integer) As String

        Dim tels As String = ""
        Try
            tels = (From b In db.tblCustomers
                     Where b.ID_Customer = idCus
                     Select b.CustomerName).First()
        Catch ex As Exception
            Return ""
        End Try
        Return tels
    End Function
   
End Class
